package com.ctshk.rpc.scenic.service.impl.app;

import com.ctshk.rpc.scenic.dto.app.ScenicProductCostStrategySpecAttrAppDTO;
import com.ctshk.rpc.scenic.entity.app.ScenicProductCostStrategySpecAttrApp;
import com.ctshk.rpc.scenic.mapper.app.ScenicProductCostStrategySpecAttrAppMapper;
import com.ctshk.rpc.scenic.service.app.IScenicProductCostStrategySpecAttrAppService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class ScenicProductCostStrategySpceAttrAppServiceImpl implements IScenicProductCostStrategySpecAttrAppService {
    @Autowired
    ScenicProductCostStrategySpecAttrAppMapper scenicProductCostStrategySpecAttrAppMapper;

    @Override
    public ScenicProductCostStrategySpecAttrAppDTO selectById(Long id) {
        ScenicProductCostStrategySpecAttrApp scenicProductCostStrategySpecAttrApp = scenicProductCostStrategySpecAttrAppMapper.selectById(id);
        ScenicProductCostStrategySpecAttrAppDTO scenicProductCostStrategySpecAttrAppDTO = new ScenicProductCostStrategySpecAttrAppDTO();
        if(scenicProductCostStrategySpecAttrApp != null){
            try{
                BeanUtils.copyProperties(scenicProductCostStrategySpecAttrApp, scenicProductCostStrategySpecAttrAppDTO);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        return scenicProductCostStrategySpecAttrAppDTO;
    }
}
